<%@ page import="java.util.Date" %>
<%@ page import="java.awt.Font" %>
<%--
  Created by IntelliJ IDEA.
  User: WuLiangHang
  Date: 2021/10/22
  Time: 19:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>样例页面</title>
</head>
<body>
<h1>标题1</h1>
<h1><%=new Date()%>
</h1>
<h2>标题2</h2>
<h3>标题3</h3>
<%=1234%><br/>
<%=12.34%><br/>
<%="Hello World"%><br/>
<%=new Date()%><br/>
<%=session%><br/>

<%--if语句--%>
<%
    int age = 10;
    if (age < 18) {
%>
<h1>太刺激了，未成年人不能观看！</h1>
<%
} else {
%>
<h1>在线发牌！</h1>
<%
    }
%>
<%--for语句--%>
<%
    for (int i = 0; i < 10; i++) {
%>
<h1><%=i%>
</h1>
<%
    }
%>
<%
    for (int i = 1; i < 10; i++) {
        for (int j = 1; j <= i; j++) {
%>
<%=j%> * <%=i%> = <%=(i * j)%>
<%
    }
%>
<br/>
<%
    }
%>

<!-- 这是html注释 -->
<%
//单行java注释
    /*
    多行代码注释
     */
%>
<%-- 这是JSP注释 --%>

<%

%>

<%!int i = 1;%>
</body>
</html>
